
from time import sleep
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By

# 1.打开浏览器
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.wait import WebDriverWait #等待类

driver = webdriver.Chrome() #创建浏览器对象
# 放大浏览器页面
driver.maximize_window()
# 2.输入访问地址（URL）
driver.get("http://121.43.169.97:8848/pageA.html")


# 显示等待
wait = WebDriverWait(driver, 3, 1)

username = wait.until(lambda x: x.find_element_by_css_selector("userA").send_keys("admin"))
# driver.find_element_by_css_selector("#userA").send_keys("admin")

sleep(3)
driver.quit()



